import {ClearHistoryApi} from "../../request/api"
Component({
  properties:{
    historyKeywordList: {
      type: Array,
      value: []
    },
    hotKeywordList: {
      type: Array,
      value: []
    }
  },
  methods:{
    async clearFn(){
      
      let res = await ClearHistoryApi({type:"POST"})
      console.log(res)
      wx.showToast({
        title: '清除成功',
        icon: 'success',
        mask:true
      })
    },
    gotoPruduct(e){
      // 修改blockShow为3，但blockShow是父组件数据
      // 需要做子传父
      this.triggerEvent("fn",{
        num:3,
        keyword:e.currentTarget.dataset.kw
        
      });
      
    }
  }
})